unit MainFormUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Menus,IsisEngine;

type
  TMainForm = class(TForm)
    MainMenu1: TMainMenu;
    Jogo1: TMenuItem;
    Iniciar1: TMenuItem;
    Parar1: TMenuItem;
    VerResultados1: TMenuItem;
    MainPanel: TPanel;
    Display: TLabel;
    AlterarNvel1: TMenuItem;
    procedure FormCreate(Sender: TObject);
    procedure Iniciar1Click(Sender: TObject);
    procedure Parar1Click(Sender: TObject);
    procedure AlterarNvel1Click(Sender: TObject);
  private
    { Private declarations }
    Isis:TIsis;
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;


implementation

uses Math, FormNivelUnit;

{$R *.dfm}

procedure TMainForm.FormCreate(Sender: TObject);
begin
   Isis:=TIsis.IsisStart(MainPanel,Display);
end;

procedure TMainForm.Iniciar1Click(Sender: TObject);
begin
   Isis.Start;
end;

procedure TMainForm.Parar1Click(Sender: TObject);
begin
   Isis.Stop;
end;

procedure TMainForm.AlterarNvel1Click(Sender: TObject);
begin
   with TfrmNivel.Create(nil)do
      try
         ShowModal;
         if(ModalResult=mrOk)then
            Isis.Level:=fRgLevel;
      finally
         Free;
      end;
end;

end.



